/**
 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.crossriver.crgis.database.model;

import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.model.impl.BaseModelImpl;

import java.io.Serializable;

import java.lang.reflect.Proxy;

import java.util.Date;

/**
 * @author Wole Adetiba
 */
public class Individual_InformationClp extends BaseModelImpl<Individual_Information>
	implements Individual_Information {
	public Individual_InformationClp() {
	}

	public String getPrimaryKey() {
		return _applicationId;
	}

	public void setPrimaryKey(String pk) {
		setApplicationId(pk);
	}

	public Serializable getPrimaryKeyObj() {
		return _applicationId;
	}

	public String getApplicationId() {
		return _applicationId;
	}

	public void setApplicationId(String applicationId) {
		_applicationId = applicationId;
	}

	public String getUserId() {
		return _userId;
	}

	public void setUserId(String userId) {
		_userId = userId;
	}

	public String getTitle() {
		return _title;
	}

	public void setTitle(String title) {
		_title = title;
	}

	public String getLastName() {
		return _lastName;
	}

	public void setLastName(String lastName) {
		_lastName = lastName;
	}

	public String getFirstName() {
		return _firstName;
	}

	public void setFirstName(String firstName) {
		_firstName = firstName;
	}

	public String getMiddleName() {
		return _middleName;
	}

	public void setMiddleName(String middleName) {
		_middleName = middleName;
	}

	public Date getDateOfBirth() {
		return _dateOfBirth;
	}

	public void setDateOfBirth(Date dateOfBirth) {
		_dateOfBirth = dateOfBirth;
	}

	public String getOccupation() {
		return _occupation;
	}

	public void setOccupation(String occupation) {
		_occupation = occupation;
	}

	public String getGender() {
		return _gender;
	}

	public void setGender(String gender) {
		_gender = gender;
	}

	public String getReligion() {
		return _religion;
	}

	public void setReligion(String religion) {
		_religion = religion;
	}

	public String getEducation() {
		return _education;
	}

	public void setEducation(String education) {
		_education = education;
	}

	public String getNationality() {
		return _nationality;
	}

	public void setNationality(String nationality) {
		_nationality = nationality;
	}

	public String getStateOfOrigin() {
		return _stateOfOrigin;
	}

	public void setStateOfOrigin(String stateOfOrigin) {
		_stateOfOrigin = stateOfOrigin;
	}

	public String getLga() {
		return _lga;
	}

	public void setLga(String lga) {
		_lga = lga;
	}

	public String getMaritalStatus() {
		return _maritalStatus;
	}

	public void setMaritalStatus(String maritalStatus) {
		_maritalStatus = maritalStatus;
	}

	public int getNoOfChildren() {
		return _noOfChildren;
	}

	public void setNoOfChildren(int noOfChildren) {
		_noOfChildren = noOfChildren;
	}

	public String getIdentificationDoc() {
		return _identificationDoc;
	}

	public void setIdentificationDoc(String identificationDoc) {
		_identificationDoc = identificationDoc;
	}

	public String getIdentificationDocNo() {
		return _identificationDocNo;
	}

	public void setIdentificationDocNo(String identificationDocNo) {
		_identificationDocNo = identificationDocNo;
	}

	public Individual_Information toEscapedModel() {
		if (isEscapedModel()) {
			return this;
		}
		else {
			return (Individual_Information)Proxy.newProxyInstance(Individual_Information.class.getClassLoader(),
				new Class[] { Individual_Information.class },
				new AutoEscapeBeanHandler(this));
		}
	}

	public Object clone() {
		Individual_InformationClp clone = new Individual_InformationClp();

		clone.setApplicationId(getApplicationId());
		clone.setUserId(getUserId());
		clone.setTitle(getTitle());
		clone.setLastName(getLastName());
		clone.setFirstName(getFirstName());
		clone.setMiddleName(getMiddleName());
		clone.setDateOfBirth(getDateOfBirth());
		clone.setOccupation(getOccupation());
		clone.setGender(getGender());
		clone.setReligion(getReligion());
		clone.setEducation(getEducation());
		clone.setNationality(getNationality());
		clone.setStateOfOrigin(getStateOfOrigin());
		clone.setLga(getLga());
		clone.setMaritalStatus(getMaritalStatus());
		clone.setNoOfChildren(getNoOfChildren());
		clone.setIdentificationDoc(getIdentificationDoc());
		clone.setIdentificationDocNo(getIdentificationDocNo());

		return clone;
	}

	public int compareTo(Individual_Information individual_Information) {
		int value = 0;

		value = getApplicationId()
					.compareTo(individual_Information.getApplicationId());

		if (value != 0) {
			return value;
		}

		return 0;
	}

	public boolean equals(Object obj) {
		if (obj == null) {
			return false;
		}

		Individual_InformationClp individual_Information = null;

		try {
			individual_Information = (Individual_InformationClp)obj;
		}
		catch (ClassCastException cce) {
			return false;
		}

		String pk = individual_Information.getPrimaryKey();

		if (getPrimaryKey().equals(pk)) {
			return true;
		}
		else {
			return false;
		}
	}

	public int hashCode() {
		return getPrimaryKey().hashCode();
	}

	public String toString() {
		StringBundler sb = new StringBundler(37);

		sb.append("{applicationId=");
		sb.append(getApplicationId());
		sb.append(", userId=");
		sb.append(getUserId());
		sb.append(", title=");
		sb.append(getTitle());
		sb.append(", lastName=");
		sb.append(getLastName());
		sb.append(", firstName=");
		sb.append(getFirstName());
		sb.append(", middleName=");
		sb.append(getMiddleName());
		sb.append(", dateOfBirth=");
		sb.append(getDateOfBirth());
		sb.append(", occupation=");
		sb.append(getOccupation());
		sb.append(", gender=");
		sb.append(getGender());
		sb.append(", religion=");
		sb.append(getReligion());
		sb.append(", education=");
		sb.append(getEducation());
		sb.append(", nationality=");
		sb.append(getNationality());
		sb.append(", stateOfOrigin=");
		sb.append(getStateOfOrigin());
		sb.append(", lga=");
		sb.append(getLga());
		sb.append(", maritalStatus=");
		sb.append(getMaritalStatus());
		sb.append(", noOfChildren=");
		sb.append(getNoOfChildren());
		sb.append(", identificationDoc=");
		sb.append(getIdentificationDoc());
		sb.append(", identificationDocNo=");
		sb.append(getIdentificationDocNo());
		sb.append("}");

		return sb.toString();
	}

	public String toXmlString() {
		StringBundler sb = new StringBundler(58);

		sb.append("<model><model-name>");
		sb.append("com.crossriver.crgis.database.model.Individual_Information");
		sb.append("</model-name>");

		sb.append(
			"<column><column-name>applicationId</column-name><column-value><![CDATA[");
		sb.append(getApplicationId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>userId</column-name><column-value><![CDATA[");
		sb.append(getUserId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>title</column-name><column-value><![CDATA[");
		sb.append(getTitle());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>lastName</column-name><column-value><![CDATA[");
		sb.append(getLastName());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>firstName</column-name><column-value><![CDATA[");
		sb.append(getFirstName());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>middleName</column-name><column-value><![CDATA[");
		sb.append(getMiddleName());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>dateOfBirth</column-name><column-value><![CDATA[");
		sb.append(getDateOfBirth());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>occupation</column-name><column-value><![CDATA[");
		sb.append(getOccupation());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>gender</column-name><column-value><![CDATA[");
		sb.append(getGender());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>religion</column-name><column-value><![CDATA[");
		sb.append(getReligion());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>education</column-name><column-value><![CDATA[");
		sb.append(getEducation());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>nationality</column-name><column-value><![CDATA[");
		sb.append(getNationality());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>stateOfOrigin</column-name><column-value><![CDATA[");
		sb.append(getStateOfOrigin());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>lga</column-name><column-value><![CDATA[");
		sb.append(getLga());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>maritalStatus</column-name><column-value><![CDATA[");
		sb.append(getMaritalStatus());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>noOfChildren</column-name><column-value><![CDATA[");
		sb.append(getNoOfChildren());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>identificationDoc</column-name><column-value><![CDATA[");
		sb.append(getIdentificationDoc());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>identificationDocNo</column-name><column-value><![CDATA[");
		sb.append(getIdentificationDocNo());
		sb.append("]]></column-value></column>");

		sb.append("</model>");

		return sb.toString();
	}

	private String _applicationId;
	private String _userId;
	private String _title;
	private String _lastName;
	private String _firstName;
	private String _middleName;
	private Date _dateOfBirth;
	private String _occupation;
	private String _gender;
	private String _religion;
	private String _education;
	private String _nationality;
	private String _stateOfOrigin;
	private String _lga;
	private String _maritalStatus;
	private int _noOfChildren;
	private String _identificationDoc;
	private String _identificationDocNo;
}